package com.pm25.response;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;

public class CitiesResponse extends AbstractResponse {
	
	private List<String> cities;

	public CitiesResponse(String responseBody) {
		super(responseBody);
	}

	@Override
	public void parseResult() {
		JsonObject jo = gson.fromJson(responseBody, JsonObject.class);;
		Type type = new TypeToken<ArrayList<String>>() {
		}.getType();
		cities = gson.fromJson(jo.get("cities"), type);
	}

	public List<String> getCities() {
		return cities;
	}

	public void setCities(List<String> cities) {
		this.cities = cities;
	}

}
